package com.zudada.servermain.POJO.enums;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(description = "分页实体类")
public class AdminPageQuery {

    @ApiModelProperty(value = "页码", required = true)
    private Integer page = 1;

    @ApiModelProperty(value = "一页条数", required = true)
    private Integer pageSize = 10;

    public <T> Page<T> toMpPage() {
        Page<T> page1 = Page.of(page, pageSize);
        return page1;

    }


}
